import { useState } from "react";
type Contact = {
	name: string;
	email: string;
};
const Chat = ( {
	contact
} : {contact : Contact} ) => {
	const [text, setText] = useState('');
	return (
		<section className="chat">
			<textarea
				value={text}
				placeholder={'Chat to ' + contact.name}
				onChange={e => setText(e.target.value)}
			/>
			<div>
				<button>Send to {contact.email}</button>
			</div>
		</section>
	);
}

export default Chat;